#!/usr/bin/env python3
# -*- coding:utf-8 -*-

f = open('test.log', 'r')

f = open('test.log', 'a')

f.write('6\n')
f.write('7\n')
f.write('8\n')
f.close()